package com.xjgzinfo.usdp.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Max;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.Instant;

/**
 * A DTO for the {@link com.xjgzinfo.usdp.domain.BladeVisualDb} entity.
 */
@ApiModel(description = "数据源 @author  jxw")
public class BladeVisualDbDTO implements Serializable {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 名称
     */
    @Size(max = 100)
    @ApiModelProperty(value = "名称")
    private String name;

    /**
     * 创建部门
     */
    @ApiModelProperty(value = "创建部门")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long createDept;

    /**
     * 密码
     */
    @Size(max = 50)
    @ApiModelProperty(value = "密码")
    private String password;

    /**
     * 连接地址
     */
    @Size(max = 500)
    @ApiModelProperty(value = "连接地址")
    private String url;

    /**
     * 驱动类
     */
    @Size(max = 100)
    @ApiModelProperty(value = "驱动类")
    private String driverClass;

    /**
     * 用户名
     */
    @Size(max = 50)
    @ApiModelProperty(value = "用户名")
    private String username;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Instant createTime;

    /**
     * 备注
     */
    @Size(max = 255)
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long updateUser;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long createUser;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private Instant updateTime;

    /**
     * 状态
     */
    @Max(value = 10)
    @ApiModelProperty(value = "状态")
    private Integer status = 1;

    /**
     * 是否已删除
     */
    @Max(value = 10)
    @ApiModelProperty(value = "是否已删除")
    private Integer isDeleted = 0;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getCreateDept() {
        return createDept;
    }

    public void setCreateDept(Long createDept) {
        this.createDept = createDept;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDriverClass() {
        return driverClass;
    }

    public void setDriverClass(String driverClass) {
        this.driverClass = driverClass;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Instant getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Instant createTime) {
        this.createTime = createTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(Long updateUser) {
        this.updateUser = updateUser;
    }

    public Long getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Long createUser) {
        this.createUser = createUser;
    }

    public Instant getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Instant updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof BladeVisualDbDTO)) {
            return false;
        }

        return id != null && id.equals(((BladeVisualDbDTO) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    // prettier-ignore
    @Override
    public String toString() {
        return "BladeVisualDbDTO{" +
                "id=" + getId() +
                ", name='" + getName() + "'" +
                ", createDept=" + getCreateDept() +
                ", password='" + getPassword() + "'" +
                ", url='" + getUrl() + "'" +
                ", driverClass='" + getDriverClass() + "'" +
                ", username='" + getUsername() + "'" +
                ", createTime='" + getCreateTime() + "'" +
                ", remark='" + getRemark() + "'" +
                ", updateUser=" + getUpdateUser() +
                ", createUser=" + getCreateUser() +
                ", updateTime='" + getUpdateTime() + "'" +
                ", status=" + getStatus() +
                ", isDeleted=" + getIsDeleted() +
                "}";
    }
}
